package com.wry.cloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <h1>  <h1>
 *
 * @author 魏如元
 * @since 2022/9/12
 */
@RestController
@RefreshScope   //支持Nacos的动态刷新功能
@RequestMapping("nacos/config")
public class ConfigClientController {

    @Value("${config.info}")
    private String configInfo;

    @GetMapping
    public String getConfigInfo(){
        return configInfo;
    }
}
